﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.Infra.UI.Common;
using System.Windows;

namespace Sinacor.Infra.UI.Controls.SmartClient
{
    internal class CleaningChangesEventManager : BaseWeakEventManager<CleaningChangesEventManager, IChangesMonitorContainer, RoutedEventArgs>
    {
        protected override void StartListening(object source)
        {
            IChangesMonitorContainer s = source as IChangesMonitorContainer;
            if (s != null)
                s.CleaningChanges += new RoutedEventHandler(HandleEvent);
        }

        protected override void StopListening(object source)
        {
            IChangesMonitorContainer s = source as IChangesMonitorContainer;
            if (s != null)
                s.CleaningChanges -= new RoutedEventHandler(HandleEvent);
        }
    }
}
